import Vue from 'vue'
import HelloWorld from '@/components/HelloWorld'
import About from '@/components/About'
import SubPage from '@/components/SubPage'
import Store from '@/components/Store'

// import Router from 'vue-router'
import Router from '@/plugins/lua-router/index'

Vue.use(Router)

export default new Router({
  // mode: 'history',
  mode: 'hash',
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: '/about',
      name: 'About',
      component: About,
      children: [
        {
          path: '',
          name: 'SubPage',
          component: SubPage,
        },
        {
          path: '/about/route',
          name: 'SubPage',
          component: SubPage,
        }
      ]
    },
    {
      path: '/store',
      name: 'Store',
      component: Store,
      children: [
        {
          path: 'subPage',
          name: 'SubPage',
          component: SubPage,
        }
      ]
    }
  ]
})
